#ifndef __PACKET_H__
#define __PACKET_H__

#if defined(linux) || defined(__LYNX)
typedef unsigned short WORD;
typedef unsigned char BYTE;
#endif


#define M_LOGON      1
#define M_PLAZA      2
#define M_GAMEFRAME  3


typedef struct tagCmdNo{
  WORD  wMNo;
  WORD  wSNo;
}CMD_NO;

#define C_LOGIN        1
typedef struct tagCmdLogin{
  char szUserName[32];
  char szPassWord[32];
}CMD_LOGIN;

#define C_REG         2
#define C_USERINFO    3

#endif

int create_packet(BYTE **buf,WORD wMCmd,WORD wSCmd,void *data,WORD wDataSize);
int send_packet(WORD wSocket,void *data,WORD wDataSize);
